package routers

import (
	"github.com/gin-gonic/gin"
	"zhanyan/controller"
)

func ClassroomRouter(r *gin.Engine) {
	classroom := r.Group("/classroom")
	{
		classroom.POST("/addClass", controller.AddClass)
		classroom.GET("/getClass", controller.GetClass)
		classroom.GET("/getAllClass", controller.GetAllClass)
		classroom.GET("/getAllClassPage", controller.GetAllClassPage)
		classroom.GET("/getAllClassNumber", controller.GetAllClassNumber)
		classroom.GET("/getAllClassByName", controller.GetAllClassByName)
		classroom.GET("/getAllClassPageByName", controller.GetAllClassPageByName)
		classroom.GET("/getAllClassByNameNumber", controller.GetAllClassByNameNumber)
		classroom.GET("/getAllClassByNameAndTid", controller.GetAllClassByNameAndTid)
		classroom.GET("/getAllClassByNameAndTidNum", controller.GetAllClassByNameAndTidNum)
		classroom.GET("/getAllClassPageByNameAndTid", controller.GetAllClassPageByNameAndTid)
		classroom.GET("/getAllClassByTidNumber", controller.GetAllClassByTidNumber)
		classroom.GET("/getAllClassPageByTid", controller.GetAllClassPageByTid)
		classroom.PUT("/updateClass", controller.UpdateClass)
		classroom.DELETE("/deleteClass/:id", controller.DeleteClass)
	}
}
